Accord Software, Inc.

tutorial04/name.c




/*
 * Accord Software, Inc.
 *
 * Tutorial 04 - CIDL file.
 *
 * print the struct received and return a struct
 */
#include "name.h"

struct name*
getname(id)
	struct name *id;
{
	static char first[LENGTH];
	static char middle[LENGTH];
	static char last[LENGTH];
	static struct name president;

	strcpy(first, "John");
	strcpy(middle, "Fitzgerald");
	strcpy(last, "Kennedy");
	
	president.first = first;
	president.middle = middle;
	president.last = last;

	printf("ipf getname received  %s %s %s\n", 
		id->first, id->middle, id->last);

	return &president;
}

[ Home | Tutorials | main.c | name.h ]
E-Mail:webmaster@accord.com
[P-045] Updated March 14, 1996
Copyright © 1993-1996 Accord Software, Inc. All rights reserved.